using Autofac;
using Drill.TestSupport.TestDomains.AutomobileDomain;

namespace Drill.DrillBits.Autofac.TestHelpers
{
	/// <summary>
	/// Test class that extends the AutofacDrillBitSetup abstract class
	/// </summary>
	public class AutofacDrillBitSetupTestClass : AutofacDrillBitSetup
	{
		/// <summary>
		/// Configures the specified resolver object.
		/// </summary>
		/// <param name="resolverObject">The resolover object (container) to be configured.</param>
		protected override void Configure(ContainerBuilder resolverObject)
		{
			var builder = resolverObject;
			builder.RegisterType<Truck>().As<IVehicle>();
			builder.RegisterType<Car>().As<IVehicle>();
			builder.RegisterType<Car>().Keyed<IVehicle>("car");
			builder.RegisterType<Truck>().Keyed<IVehicle>("truck");
		}
	}
}